package com.guigu.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guigu.pojo.OrderDetails;
import com.guigu.service.OrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * <p>
 * 订单明细表 前端控制器
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-03-12
 */
@CrossOrigin
@RestController
@RequestMapping("/order-details")
public class OrderDetailsController {

    @Autowired
    private OrderDetailsService orderDetailsService;

    @PostMapping("getOrderDetail")
    @ResponseBody
    public Page<OrderDetails> getAllOrderDetailsByOrderNum(@RequestBody HashMap<String, Object> map) {
        Page<OrderDetails> allOrderDetailsByOrderNumber = orderDetailsService.getAllOrderDetailsByOrderNumber(map);
        return allOrderDetailsByOrderNumber;
    }
}

